package com.sudo.boot.mapper.sys.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Table("sys_job_log")
public class SysJobLog {

    @Id(keyType = KeyType.Auto)
    private Integer id;

    private Integer jobId;

    private String jobServer;

    private String jobBean;

    private String jobMethod;

    private String jobParams;

    /**
     * 任务运行结果
     * {@link com.sudo.boot.common.constant.enums.SysJobResult}
     */
    private String jobResult;

    /**
     * 任务备注
     */
    private String jobNote;
    /**
     * 任务备注明细
     */
    @Column(isLarge = true)
    private String jobNoteDesc;

    /**
     * 任务开始时间
     */
    private String jobStartTime;

    /**
     * 任务结束时间
     */
    private String jobEndTime;
    /**
     * 任务耗时
     */
    private Long jobUseTime;


    /**
     * {@link com.sudo.boot.common.constant.enums.SysJobAction}
     */
    private String jobAction;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

}
